// stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix

// Reboot
//
// Normalization of HTML elements, manually forked from Normalize.css to remove
// styles targeting irrelevant browsers while applying new styles.
//
// Normalize is licensed MIT. https://github.com/necolas/normalize.css


// Document
//
// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
// 2. Change the default font family in all browsers.
// 3. Correct the line height in all browsers.
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
// 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
//    we force a non-overlapping, non-auto-hiding scrollbar to counteract.
// 6. Change the default tap highlight to be completely transparent in iOS.

$wxtags :() !default;
$wxtags:map-merge((
    "page":"page"
    ,"view":"view"
    ,"scroll-view":"scroll-view"
    ,"swiper":"swiper"
    ,"movable-area":"movable-area"
    ,"movable-view":"movable-view"
    ,"cover-view":"cover-view"
    ,"cover-image":"cover-image"
    ,"icon":"icon"
    ,"text":"text"
    ,"rich-text":"rich-text"
    ,"progress":"progress"
    ,"button":"button"
    ,"checkbox-group":"checkbox-group"
    ,"checkbox":"checkbox"
    ,"form":"form"
    ,"input":"input"
    ,"label":"label"
    ,"picker":"picker"
    ,"picker-view":"picker-view"
    ,"picker-view-column":"picker-view-column"
    ,"radio-group":"radio-group"
    ,"radio":"radio"
    ,"slider":"slider"
    ,"switch":"switch"
    ,"textarea":"textarea"
    ,"navigator":"navigator"
    ,"audio":"audio"
    ,"image":"image"
    ,"video":"video"
    ,"camera":"camera"
    ,"live-player":"live-player"
    ,"live-pusher":"live-pusher"
    ,"map":"map"
    ,"canvas":"canvas"
    ,"open-data":"open-data"
    ,"web-view":"web-view"
), $wxtags );


@each $tag,$value in $wxtags{
    #{$tag},
    #{$tag}::before,
    #{$tag}::after {
        box-sizing: border-box; // 1
    }
}

// stylelint-enable selector-list-comma-newline-after

// Body
//
// 1. Remove the margin in all browsers.
// 2. As a best practice, apply a default `background-color`.
// 3. Set an explicit initial text-align value so that we can later use the
//    the `inherit` value on things like `<th>` elements.

page {
  margin: 0; // 1
  font-family: $font-family-base;
  font-size: $font-size-base;
  font-weight: $font-weight-base;
  line-height: $line-height-base;
  color: $body-color;
  text-align: left; // 3
  background-color: $body-bg; // 2
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}




//
// Typography
//


label {
  // Allow labels to use `margin` for spacing.
  display: inline-block;
  margin-bottom: ($base-size * 0.5);
}

// Remove the default `border-radius` that macOS Chrome adds.
//
// Details at https://github.com/twbs/bootstrap/issues/24093
button {
  border-radius: 0;
}

// Work around a Firefox/IE bug where the transparent `button` background
// results in a loss of the default `button` focus styles.
//
// Credit: https://github.com/suitcss/base/
button:focus {
  outline: 1px dotted;
  outline: 5px auto -webkit-focus-ring-color;
}

input,
button,
textarea {
  margin: 0; // Remove the margin in Firefox and Safari
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button,
input {
  overflow: visible; // Show the overflow in Edge
}

button,{
  text-transform: none; // Remove the inheritance of text transform in Firefox
}


textarea {
  overflow: auto; // Remove the default vertical scrollbar in IE.
  // Textareas should really only resize vertically so they don't break their (horizontal) containers.
  resize: vertical;
}

progress {
  vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
}

// Correct the cursor style of increment and decrement buttons in Chrome.
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

// Always hide an element with the `hidden` HTML attribute (from PureCSS).
// Needed for proper display in IE 10-.
[hidden] {
  display: none !important;
}
